/*
A. Donut Shops
cf_20_6_25_1373A
*/
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstring>
using namespace std;
int main()
{
	int t;
	scanf("%d",&t);
	while(t--)
	{
		long long a,b,c;
		scanf("%lld %lld %lld",&a,&b,&c);
		if(a>=c) printf("-1 ");
		else 
		{
			printf("1 ");
		}
		if(a*b<=c) printf("-1\n");
		else printf("%d\n",b);
	}
}
